package com.tengju.motivation.domain.model.goods;


import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import static com.tengju.motivation.domain.model.goods.GoodsType.BRAND;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Goods {

    public final static Goods  OTHER_BRAND_GOODS = new Goods(BRAND,"-1", "其他");
    public final static Goods  ALL_BRAND_GOODS = new Goods(BRAND,"-2", "全部");

    private GoodsType goodsType;

    private String id;

    private String name;

    @JsonIgnore
    public Long getLongId(){
        return Long.parseLong(id);
    }

}